package com.campus.api.mapper;

import com.campus.api.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    User selectById(@Param("id") Long id);
    
    User selectByOpenid(@Param("openid") String openid);
    
    void insert(User user);
    
    void update(User user);
    
    void updateStudentInfo(@Param("userId") Long userId,
                          @Param("studentId") String studentId,
                          @Param("realName") String realName);

    User selectByPhone(@Param("phone") String phone);
    
    User selectByStudentId(@Param("studentId") String studentId);
    
    void updateStatus(@Param("userId") Long userId, @Param("status") Integer status);
    
    void updatePassword(@Param("userId") Long userId, @Param("password") String password);
} 